import { ValidationError, ValidationPipe } from '@nestjs/common'

export class validateCustom extends ValidationPipe {
	protected flattenValidationErrors(validationErrors: ValidationError[]): any {
		return validationErrors.map((error) => ({ field: error.property, message: Object.values(error.constraints) }))
	}
}
